<% if vulnerability.is_a? Vulnerability %>
<%= _("Issue created from vulnerability %{vulnerability_link}".html_safe) % { vulnerability_link: "[#{vulnerability.id}|#{vulnerability_url(vulnerability)}]" } %>

<% end %>
h3. <%= _("Description") %>:

<%= vulnerability.description %>

<% if vulnerability.severity.present? %>
* <%= _("Severity") %>: <%= vulnerability.severity %>
<% end %>
<% if vulnerability.confidence.present? %>
* <%= _("Confidence") %>: <%= vulnerability.confidence %>
<% end %>
<% if vulnerability.try(:location_text) && vulnerability.try(:location_link) %>
* <%= _("Location") %>: [<%= vulnerability.try(:location_text) %>|<%= vulnerability.try(:location_link) %>]
<% end %>
<% if vulnerability.try(:evidence_issue_description) %>

<%= vulnerability.evidence_issue_description %>
<% end %>
<% if vulnerability.solution.present? && vulnerability.is_a?(Vulnerability) %>

### <%= _("Solution") %>:

<%= _("See vulnerability %{vulnerability_link} for any Solution details.".html_safe) % { vulnerability_link: "[#{vulnerability.id}|#{vulnerability_url(vulnerability)}]" } %>
<% end %>

<% if vulnerability.identifiers.present? %>
h3. <%= _("Identifiers") %>:

<% vulnerability.identifiers.each do |identifier| %>
<% if identifier[:url].present? %>
* [<%= identifier[:name] %>|<%= identifier[:url] %>]
<% else %>
* <%= identifier[:name] %>
<% end %>
<% end %>
<% end %>

<% if vulnerability.links.present? %>
h3. <%= _("Links") %>:

<% vulnerability.links.each do |link| %>
<% if link[:name].present? %>
* [<%= link[:name] %>|<%= link[:url] %>]
<% else %>
* <%= link[:url] %>
<% end %>
<% end %>
<% end %>

<% if vulnerability.is_a?(Vulnerability) && vulnerability.remediations.present? %>
### <%= _("Remediations") %>:

<%= _("See vulnerability %{vulnerability_link} for any Remediation details.".html_safe) % { vulnerability_link: "[#{vulnerability.id}|#{vulnerability_url(vulnerability)}]" } %>
<% end %>

<% if vulnerability_scan_data?(vulnerability) %>
h3. <%= _("Scanner") %>:

<% if vulnerability.scanner.present? %>
* <%= _("Name") %>: <%= vulnerability.scanner[:name] %>
<% end %>
<%- scan_data = vulnerability.scan -%>
<% if scan_data.present? %>
<% if scan_data.type.present? %>
* <%= _("Type") %>: <%= scan_data.type %>
<% end %>
<% unless vulnerability.is_a?(Security::Finding) %>
<% if scan_data.status.present? %>
* <%= _("Status") %>: <%= scan_data.status %>
<% end %>
<% if scan_data.start_time.present? %>
* <%= _("Start Time") %>: <%= scan_data.start_time %>
<% end %>
<% if scan_data.end_time.present? %>
* <%= _("End Time") %>: <%= scan_data.end_time %>
<% end %>
<% end %>
<% end %>
<% end %>
